package day01.day02;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.Date;


/**
 * @author feng
 * @Date 2021/9/17 7:45
 */
public class Test {
    public static void main(String[] args) {
        //获取系统当前日期
        LocalDate date = LocalDate.now();
        int month = date.getMonthValue();
        // 当前月的第几天
        int today = date.getDayOfMonth();
        // start of month  2021-9-1
        date = date.minusDays(today-1);

        DayOfWeek weekday = date.getDayOfWeek();
        int value = weekday.getValue();
        // 第一天是星期三

        System.out.println("Mon Tue Wed Thu Fri Set Sun ");
        for (int i = 0; i <value ; i++) {
            System.out.println(" ");
        }

    }
}
